<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>

        
        function fun(){
            alert("函数执行");
            for(var i=0;i<5;i++)
            {
                if(i==2)
                break;
            }
            console.log("执行完了");

        }
        fun();
        /* 
            返回值可以是任意数据类型
        */
        function fun2(){
            return{name:"沙和尚"};
        }
        var a=fun2();
        console.log(a.name);

    </script>
</head>
<body>
    
</body>
</html>